sum, temp = 0, 1
n =int(input("请输入阶乘数："))
for i in range(1,n+1):
    temp*=i
    sum+=temp
print("运算结果为：",sum)

